<?php

/*
 *	Application namespace
 */
namespace Application\Controllers
{
	/*
	 *	Images controller
	 */
	final class Images
	{
		/*
		 *	$image	string	Requested image name
		 */
		public $image;
		 
		/*
		 *	Index method
		 */
		public function __index($params = array(), $method = 'get')
		{
			\Nano\Headers::send(404);
		}
		
		/*
		 *	Process method
		 */
		public function __process($data)
		{
			$image = \Nano\Template::getInstance()->path.DS.\Nano\Template::getInstance()->list['images_folder'].DS.str_replace('/', '\\', $data[1]);
			
			//\Nano\Headers::send();
			
			\Nano\Output::getInstance()->send('image', $image);
		}
	}
}